package linkList;

import exceptions.BadDataException;
import exceptions.EmptyLinkedListException;
import exceptions.OutOfLinkedListException;

public class Demo {
	public static void main(String[] args) throws BadDataException {
		
		ILinkedList myList = new LinkedList();
		myList.add("Parvi element");
		myList.add("Vtori element");
		myList.add("Treti element");
		
		for(int i = 0; i < myList.getSize(); i++){
			try {
				System.out.println(myList.get(i));
			} catch (OutOfLinkedListException | EmptyLinkedListException e) {
				e.printStackTrace();
			}
		}
	}
}
